home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
DELPHI32
/
GRAPHICS
/
IMGLIB95
/
UTOOLBAR.PA_
/
UTOOLBAR.PA
Wrap
Text File
|
1996-03-31
|
5KB
|
171 lines
{
Written by Jan Dekkers and Kevin Adams (c) 1995, 1996. If you are a non
registered client, you may use or alter this demo only for evaluation
purposes.
Copyright by SkyLine Tools. All rights reserved.
Part of Imagelib VCL/DLL Library.
}
unit utoolbar;
{Includes settings to compile in either 16 or 32 bit}
{$I DEFILIB.INC}
interface
uses
{$IFDEF DEL32}
Windows,
{$ELSE}
WinTypes,
WinProcs,
{$ENDIF}
DLL95V1, {ImageLib Dll interface and misc. functions}
Messages,
SysUtils,
Classes,
Graphics,
Controls,
Forms,
Dialogs,
StdCtrls,
ExtCtrls,
Spin,
IToolB, {PMultiImage Toolbar VCL component}
TMultiP; {PMultiImage VCL component}
type
TBForm1 = class(TForm)
PMultiImage1: TPMultiImage;
Label1: TLabel;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
CheckBox5: TCheckBox;
CheckBox6: TCheckBox;
CheckBox7: TCheckBox;
CheckBox8: TCheckBox;
CheckBox9: TCheckBox;
CheckBox10: TCheckBox;
CheckBox11: TCheckBox;
CheckBox12: TCheckBox;
CheckBox13: TCheckBox;
Bevel1: TBevel;
Label2: TLabel;
CheckBox14: TCheckBox;
CheckBox15: TCheckBox;
CheckBox17: TCheckBox;
CheckBox18: TCheckBox;
CheckBox19: TCheckBox;
ImageToolBar1: TMImageToolBar;
SpinEdit1: TSpinEdit;
SpinEdit2: TSpinEdit;
Label3: TLabel;
Label4: TLabel;
CheckBox16: TCheckBox;
procedure CheckBox1Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure CheckBox17Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure SpinEdit1Change(Sender: TObject);
procedure SpinEdit2Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
BForm1: TBForm1;
implementation
{$R *.DFM}
{------------------------------------------------------------------------}
procedure TBForm1.CheckBox1Click(Sender: TObject);
begin
{Show or hide toolbar button}
ImageToolBar1.tbScanImage:=CheckBox18.Checked;
ImageToolBar1.tbScanSelect:=CheckBox16.Checked;
ImageToolBar1.tbColorPalette:=CheckBox19.Checked;
ImageToolBar1.tbImageOpen:=CheckBox1.Checked;
ImageToolBar1.tbImageSave:=CheckBox2.Checked;
ImageToolBar1.tbCutImage:=CheckBox3.Checked;
ImageToolBar1.tbCopyImage:=CheckBox4.Checked;
ImageToolBar1.tbPasteImage:=CheckBox5.Checked;
ImageToolBar1.tbZoomInImage:=CheckBox6.Checked;
ImageToolBar1.tbPrintImage:=CheckBox13.Checked;
ImageToolBar1.tbStretchImageratio:=CheckBox12.Checked;
ImageToolBar1.tbStretchImage:=CheckBox11.Checked;
ImageToolBar1.tbResetImage:=CheckBox10.Checked;
ImageToolBar1.tbFlipImage:=CheckBox9.Checked;
ImageToolBar1.tbRotateImage:=CheckBox8.Checked;
ImageToolBar1.tbZoomOutImage:=CheckBox7.Checked;
ImageToolBar1.tbScrollMessage:=CheckBox14.Checked;
ImageToolBar1.tbCreditMessage:=CheckBox15.Checked;
end;
{------------------------------------------------------------------------}
procedure TBForm1.FormActivate(Sender: TObject);
begin
CheckBox13.Checked:=ImageToolBar1.tbPrintImage;
CheckBox12.Checked:=ImageToolBar1.tbStretchImageratio;
CheckBox11.Checked:=ImageToolBar1.tbStretchImage;
CheckBox10.Checked:=ImageToolBar1.tbResetImage;
CheckBox9.Checked:=ImageToolBar1.tbFlipImage;
CheckBox8.Checked:=ImageToolBar1.tbRotateImage;
CheckBox7.Checked:=ImageToolBar1.tbZoomOutImage;
CheckBox6.Checked:=ImageToolBar1.tbZoomInImage;
CheckBox5.Checked:=ImageToolBar1.tbPasteImage;
CheckBox4.Checked:=ImageToolBar1.tbCopyImage;
CheckBox3.Checked:=ImageToolBar1.tbCutImage;
CheckBox2.Checked:=ImageToolBar1.tbImageSave;
CheckBox1.Checked:=ImageToolBar1.tbImageOpen;
CheckBox14.Checked:=ImageToolBar1.tbScrollMessage;
CheckBox15.Checked:=ImageToolBar1.tbCreditMessage;
end;
{------------------------------------------------------------------------}
procedure TBForm1.CheckBox17Click(Sender: TObject);
begin
ImageToolBar1.ShowToolbar:=CheckBox17.Checked;
end;
{------------------------------------------------------------------------}
procedure TBForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
BForm1:=Nil;
Action:=caFree;
end;
{------------------------------------------------------------------------}
procedure TBForm1.SpinEdit1Change(Sender: TObject);
begin
ImageToolBar1.tbTop:=SpinEdit1.Value;
end;
{------------------------------------------------------------------------}
procedure TBForm1.SpinEdit2Change(Sender: TObject);
begin
ImageToolBar1.tbLeft:=SpinEdit2.Value;
end;
{------------------------------------------------------------------------}
procedure TBForm1.FormCreate(Sender: TObject);
begin
ImageToolBar1.PreviewsDir:=ExtractFilePath(Application.Exename);
end;
end.